<html>
	<head>
		<link rel="stylesheet" type="text/css" href="..\styles.css">
	</head>
	<body>
		<img src="..\..\hydra.png" alt="" align="right">
		<p class="h1">
			SimpleVisual Example
		</p>
		<P>
			This example demonstrates how to load a Hydra module, display a visual plugin 
			in&nbsp;the host application, and properly unload the module and the plugin.
		</P>
		<P>&nbsp;</P>
		<p class="h2">
			Things to look at in Host.exe
		</p>
		<P>The most important methods in the host application are <STRONG>bLoadClick</STRONG>
			and <STRONG>bUnloadClick</STRONG>.</P>
		<UL>
			<LI>
				<STRONG>bLoadClick </STRONG>loads a Hydra module via the ModuleManager's 
				LoadModule method and then creates an instance of the visual plugin 
				"MyFirstVisualPlugin" (<EM>see the initialization section of the unit 
					fVisualPlugin.pas</EM>).
			<LI>
				The <STRONG>CreateVisualPlugin</STRONG>
			method takes a plugin name as input parameter and returns an IHYVisualPlugin 
			reference. We&nbsp;then dock that to the HostPanel using the ShowParented 
			method.
			<LI>
				Pay special attention to the fact that we kept a reference to this interface using 
				the field fPluginForm: <FONT color="red">when a plugin reference goes out of scope 
					the plugin is destroyed.</FONT>
			<LI>
				<STRONG>bUnloadClick </STRONG>does the opposite of what we did in the first 
				method: it releases the reference to the plugin by calling the method 
				ModuleManager.ReleaseInstance and then unloads the Hydra module. The call to 
				ReleaseInstance is equivalent to fPluginForm := NIL</LI>
		</UL>
		<P class="h2">Things to&nbsp;look at in VisualModule.hpm</P>
		<P>There's almost no code in this module. What you should <STRONG>get familiar with </STRONG>
			is <STRONG>the structure of these type of&nbsp;projects</STRONG>. <FONT color="red">
				Hydra modules always contain a module controller </FONT>unit (<EM>mcModuleController.pas 
				in this example</EM>) and a number of plugin units (<EM>fVisualPlugin.pas in 
				this example</EM>). Take a look at the initialization section of these two 
			units and  browse the Hydra source code to find out more about them.
		</P>
		<P>&nbsp;</P>
	</body>
</html>
